emo = {index: (score, int(score) > 50) for index, score in enumerate(input().split())}
while True:
    x = int(input())
    if 0 <= x <= 23:
        print(emo[x][0], 'Yes' if emo[x][1] else 'No')
    else:
        break